package org.xiaodongwei.config;

import java.io.FileInputStream;
import java.util.Properties;

public class HotSpotConfig {

    public static boolean DEBUG;
    public static boolean ENABLE_LOG;
    public static String VERSION_CODE;

    static {
        DEBUG = true;
        ENABLE_LOG = true;
        VERSION_CODE = "1.0.0";

        load();
    }

    private static void load() {
        Properties props = new Properties();
        try {
            FileInputStream fis = new FileInputStream("src/main/resources/hotspot_config.properties");
            props.load(fis);
            DEBUG = Boolean.parseBoolean(props.getProperty("DEBUG"));
            ENABLE_LOG = Boolean.parseBoolean(props.getProperty("ENABLE_LOG"));
            VERSION_CODE = props.getProperty("HOTSPOT_VERSION");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
